package com.ywjt.platformbusiness.market.integralgoods.activity;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.ywjt.platformbusiness.R;
import com.ywjt.platformbusiness.base.BaseActivity;
import com.ywjt.platformbusiness.market.commongoods.activity.ActivitySettleMentPay;
import com.ywjt.platformbusiness.market.commongoods.adapter.SettlementDeskAdapter;

import java.util.ArrayList;
import java.util.List;

public class ActivityIntegralSettleMent extends BaseActivity implements View.OnClickListener {
    private RecyclerView rcGood;
    private SettlementDeskAdapter deskAdapter;
    private List<String> data;
    private TextView tvConfirmPay;

    public static void actionStart(Context context) {
        Intent intent = new Intent(context, ActivityIntegralSettleMent.class);
        context.startActivity(intent);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.tvConfirmPay:
                ActivitySettleMentPay.actionStart(this);
                break;
        }
    }

    @Override
    protected void init(Bundle savedInstanceState) {
        setAndroidNativeLightStatusBar(true);
    }

    @Override
    protected int setLayoutResourceID() {
        return R.layout.activity_integralsettlement_desk;
    }

    @Override
    protected void initView() {
        setTitleText("填写订单");
        tvConfirmPay=findViewById(R.id.tvConfirmPay);
        rcGood=findViewById(R.id.rcGood);
        data=new ArrayList<>();
        data.add("");
        data.add("");
        deskAdapter=new SettlementDeskAdapter(data);
        rcGood.setAdapter(deskAdapter);
        rcGood.setLayoutManager(new LinearLayoutManager(this));

        tvConfirmPay.setOnClickListener(this::onClick);
    }

    @Override
    protected void initData() {

    }

    /**
     * 获取要使用的标题栏样式(此函数由子类重写)
     *
     * @return
     */
    @Override
    protected int getTitleBarType() {
        return 0;
    }
}
